package com.zhengxiang.onlinexamination.controller;

import com.zhengxiang.onlinexamination.base.AjaxResult;
import com.zhengxiang.onlinexamination.entity.CustomerUser;
import com.zhengxiang.onlinexamination.entity.vo.CustomerUserVo;
import com.zhengxiang.onlinexamination.service.CustomerUserService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 员工(CustomerUser)表控制层
 *
 * @author makejava
 * @since 2023-03-29 22:12:07
 */
@RestController
@RequestMapping("customerUser")
public class CustomerUserController {
    /**
     * 服务对象
     */
    @Resource
    private CustomerUserService customerUserService;
        /**
         *  用户列表
         * */
    @PostMapping("/pageList")
    public AjaxResult pageList(@RequestBody CustomerUserVo customerUserVo){

        return AjaxResult.success(customerUserService.pageList(customerUserVo));
    }
    /**新增人员*/
    @PostMapping("/addCustomerUser")
    public AjaxResult addCustomerUser(@RequestBody CustomerUserVo customerUserVo){
        customerUserService.addCustomerUser(customerUserVo);
        return AjaxResult.success();
    }

}

